-- GENERATED SPELL FOR [Phase-Hunter] --


function spell0_20906(pUnit, Event) --@Back Attack,n/a--
pUnit:FullCastSpellOnTarget(36909,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20906', 550, 1)
end

function spell1_20906(pUnit, Event) --@Phase Burst,Self--
pUnit:FullCastSpellOnTarget(36910,pUnit)
pUnit:RegisterEvent('Sorts_20906', 8324, 1)
end

function spell2_20906(pUnit, Event) --@Warp,n/a--
pUnit:FullCastSpellOnTarget(36908,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20906', 607, 1)
end

function Sorts_20906(pUnit, Event)
local choix_sorts_20906 = math.random(0, 2)
if choix_sorts_20906 == 0 then
pUnit:RegisterEvent('spell0_20906', 1, 1)
end
if choix_sorts_20906 == 1 then
pUnit:RegisterEvent('spell1_20906', 1, 1)
end
if choix_sorts_20906 == 2 then
pUnit:RegisterEvent('spell2_20906', 1, 1)
end
end

function mob20906_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20906', math.random(1500, 3000), 1)
end

function mob20906_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20906_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20906_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20906, 1, 'mob20906_Action')
RegisterUnitEvent(20906, 2, 'mob20906_Leave')
RegisterUnitEvent(20906, 3, 'mob20906_Kill')
RegisterUnitEvent(20906, 4, 'mob20906_Die')
